﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/MasterPage2.master" AutoEventWireup="true" CodeFile="Admin_ThongKeMuaHangKhachHangTheoThang.aspx.cs" Inherits="ChucNang_Admin_Admin_ThongKeDoanhThuSanPhamTheoThang" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h2>THỐNG KÊ MUA HÀNG CỦA KHÁCH HÀNG THEO THÁNG</h2>
 <br />
    Chọn khách hàng:<asp:DropDownList ID="dropdownlistKhachHang" runat="server" 
        DataSourceID="ObjectDataSource1" DataTextField="HoTen" DataValueField="Id">
    </asp:DropDownList>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        DeleteMethod="Delete" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="TAIKHOAN_LayTatCa" 
        TypeName="DataDSTableAdapters.TAIKHOANTableAdapter">
        <DeleteParameters>
            <asp:Parameter Name="Original_Id" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>
&nbsp;&nbsp;
    Chọn năm:<asp:DropDownList ID="dropdownNam" runat="server" 
        DataSourceID="SqlDataSource1" DataTextField="Nam" DataValueField="Nam" 
        >
    </asp:DropDownList>
    <asp:Button ID="btnThongKe" runat="server" onclick="btnThongKe_Click" 
        Text="Thống kê" />
    <br />
    <br />
    
    <center>
        <asp:Label ID="Label1" runat="server" Text="CMND:" Visible="False"></asp:Label>
&nbsp;<asp:Label ID="lbCMND" runat="server" Text="Label" Visible="False"></asp:Label>
        <br />
        <asp:Image ID="imgKhachHang" runat="server" Height="150px" Width="150px" />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        BackColor="Black" BorderColor="Silver" BorderStyle="None" BorderWidth="1px" 
        CellPadding="4" Height="61px" Width="354px">
        <RowStyle BackColor="White" BorderColor="Black" ForeColor="#330099" />
        <Columns>
            <asp:BoundField DataField="Thang" HeaderText="Tháng" />
            <asp:BoundField DataField="DoanhThu" HeaderText="DoanhThu" />
        </Columns>
        <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
        <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
    </asp:GridView>
        <br />
        <asp:Label ID="Label2" runat="server" ForeColor="Red" 
            Text="Các đơn hàng của khách hàng trong tháng" Visible="False"></asp:Label>
&nbsp;<asp:DropDownList ID="dropdownlistThang" runat="server" Visible="False">
            <asp:ListItem>1</asp:ListItem>
            <asp:ListItem>2</asp:ListItem>
            <asp:ListItem>3</asp:ListItem>
            <asp:ListItem>4</asp:ListItem>
            <asp:ListItem>5</asp:ListItem>
            <asp:ListItem>6</asp:ListItem>
            <asp:ListItem>7</asp:ListItem>
            <asp:ListItem>8</asp:ListItem>
            <asp:ListItem>9</asp:ListItem>
            <asp:ListItem>10</asp:ListItem>
            <asp:ListItem>11</asp:ListItem>
            <asp:ListItem>12</asp:ListItem>
        </asp:DropDownList>
&nbsp;<asp:Button ID="btnXem" runat="server" onclick="btnXem_Click" Text="Xem" 
            Visible="False" />
        <br />
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" 
            CellPadding="3" GridLines="Vertical">
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
            <Columns>
                <asp:BoundField DataField="ThoiGianDatHang" HeaderText="Thời Gian Đặt Hàng" />
                <asp:BoundField DataField="TenSP" HeaderText="Sản Phẩm" />
                <asp:BoundField DataField="DonGia" HeaderText="Đơn Giá" />
                <asp:BoundField DataField="SoLuongMua" HeaderText="Số Lượng" />
                <asp:BoundField DataField="TongTien" HeaderText="Tổng Tiền" />
            </Columns>
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="#DCDCDC" />
        </asp:GridView>
    </center>
    <br />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SMOConnectionString %>" 
        SelectCommand="sp_DATHANG_LayTatCaNam" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
</asp:Content>

